import * as constant from './constant'
import axios from 'axios'
const getBoardList = ( result ) => ({
    type: constant.GET_BOARD_LIST,
    boardList: result.boardList
})
export const getBoardData = () => {
    return (dispatch) => {
        axios.get('/api/home.json').then((res) => {
            const result = res.data.data;
            dispatch( getBoardList(result) );
        })
    }
}